# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Tom K <tomk@runbox.com>
# Contributor: Todd Musall <tmusall@gmail.com>

pkgname=gnubiff
pkgver=2.2.17
pkgrel=11
pkgdesc='Mail notification program that checks for mail and displays headers when new mail has arrived'
arch=('loong64' 'x86_64')
url='http://gnubiff.sourceforge.net/'
license=('GPL3')
depends=('gtk3')
makedepends=('intltool')
source=("https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
        'gnubiff.appdata.xml')
sha256sums=('e616ab031d493e4b9b27a2bccc810e4b2ada912b3cf8d44f39325cbc5293fb2c'
            '372cec540a50c0f1be01f8e097f5d530dc5f78d571337377048652e62c0cc939')

prepare() {
  cd $pkgname-$pkgver
  sed -i 's|$(datadir)/pixmaps|$(datadir)/icons/hicolor/48x48/apps|' art/Makefile.am
  autoreconf -fi
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --disable-fam --disable-gnome --with-password \
    --with-password-string="65423957eb027b94c9e661611c0e4271"
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" DATADIRNAME=share install
  install -Dm644 art/tux-awake.png "$pkgdir/usr/share/icons/hicolor/64x64/apps/gnubiff.png"
  install -Dm644 ../gnubiff.appdata.xml "$pkgdir/usr/share/metainfo/gnubiff.appdata.xml"
}
